package org.jsola.contract.service.impl;

import org.jsola.common.DateKit;
import org.jsola.contract.entity.ContractDO;
import org.jsola.contract.service.IContractPathService;
import org.springframework.stereotype.Service;

import java.util.Date;


/**
 * @author zhenghua
 */
public class ContractPathServiceImpl implements IContractPathService {


    @Override
    public String getFileName(ContractDO contractDO, String siteId) {
        return contractDO.getId() + "_" + DateKit.getFormatDate(new Date(), "yyyyMMddHHmmss") + ".pdf";
    }

    @Override
    public String getOriginalFilename(ContractDO contractDO, String siteId) {
        return contractDO.getName() + "(" + contractDO.getSignNo() + ").pdf";
    }

}
